// 专门定义路由表
// 未来会根据路由表动态创建Routes和Route
import Home from './pages/Home'
import Login from './pages/Login'
import Test1 from './pages/Test1'
import Test2 from './pages/Test2'
import Unknow from './pages/404'
import { Navigate } from 'react-router-dom'
export default [
  {
    path: 'home',
    element: <Home></Home>,
    children: [
      {
        path: 'test1',
        element: <Test1></Test1>,
      },
      {
        path: 'test2',
        element: <Test2></Test2>,
      },
    ],
  },
  {
    path: 'login/:xxx/:yyy?',
    element: <Login></Login>,
  },
  {
    path: '404',
    element: <Unknow></Unknow>,
  },
  {
    // 当上面所有的路径都不匹配的时候,都会匹配这个*.
    path: '*',
    element: <Navigate to="/404"></Navigate>,
  },
]
